#include <stdio.h>
#include <stdarg.h>
#include "log.h"

CLog::CLog(const char * LogDir)
{
}

CLog::~CLog()
{
}

void CLog::Error(const char * file, int line, const char * fmt, ...)
{
	va_list arg;
	va_start(arg, fmt);
	char tmp[1024];
	vsnprintf(tmp, 1023, fmt, arg);
	printf("ERROR:%s %d %s\n", file, line, tmp);
}

void CLog::Info(const char * file, int line, const char * fmt, ...)
{
	va_list arg;
	va_start(arg, fmt);
	char tmp[1024];
	vsnprintf(tmp, 1023, fmt, arg);
	printf("INFO:%s %d %s\n", file, line, tmp);
}

void CLog::Warn(const char * file, int line, const char * fmt, ...)
{
	va_list arg;
	va_start(arg, fmt);
	char tmp[1024];
	vsnprintf(tmp, 1023, fmt, arg);
	printf("WARN:%s %d %s\n", file, line, tmp);
}
